package com.xinongbest.entity;

import org.springframework.beans.factory.InitializingBean;

public class Apple implements InitializingBean {
    private String title;
    private String origin;
    private String color;

    public String getTitle() {
        return title;
    }

    public Apple() {
        System.out.println("正在创建Apple对象：" + this);
    }

    public Apple(String title, String origin, String color) {
        this.title = title;
        this.origin = origin;
        this.color = color;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getOrigin() {
        return origin;
    }

    public void setOrigin(String origin) {
        this.origin = origin;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    @Override
    public void afterPropertiesSet() throws Exception {
        System.out.println("InitializingBean#afterPropertiesSet");
    }
}
